/* author: sailing date: 2018/11/7 func: **/

<template>
	<div v-show="flag" v-loading="loading1" data-mu-loading-size="40" class="newLoading"></div>
</template>

<script type="text/javascript">
import eventBus from '../server/eventBus.js'
export default {
	data() {
		return {
			loading1: true,
			flag: false
		};
	},

	methods: {
		showLoading () {
			this.flag = true
		},
		showLoading () {
			this.flag = false
		}
	},

	mounted () {
		
		eventBus.$on('showLoading', this.showLoading)
		eventBus.$on('hideLoading', this.hideLoading)
	},

	components: {}
};
</script>

<style lang="less">
.newLoading {
	width: 100px;
	height: 100px;
	background: #fff;
	box-shadow: 1px 1px 1px #ccc;
	position: fixed;
	transform: translate(-50%, -50%);
	left: 50%;
	top: 200px;
	z-index: 10000;
}
</style>
